/**
 * Copyright (C) 2010 Cloudfarming <info@cloudfarming.nl>
 *
 * Licensed under the Eclipse Public License - v 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.eclipse.org/legal/epl-v10.html
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package nl.cloudfarming.sensor.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Merijn Zengers Gerben Feenstra
 */
@Entity
@Table(name = "PLOTDATAFILE")
public class PlotDataFileBO implements Serializable, DataFileBO//extends DataFileBO{
{
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name="GEOSENSORDATAFILE_ID")
    private long dataFileId;

    @Column(name="FILENAME")
    private String fileName;

    @Column(name="MD5_CHEKSUM")
    private String checksum;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="FILE_CREATED")
    private Date fileCreated;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="FILE_READ")
    private Date fileRead;

     /**
     * For JPA use only.
     */
    @Deprecated
    protected PlotDataFileBO() {
    }

    public PlotDataFileBO(String fileName, String checksum, Date fileCreated, Date fileRead) {
        this.fileName = fileName;
        this.checksum = checksum;
        this.fileCreated = fileCreated;
        this.fileRead = fileRead;
    }

    public Date getFileRead() {
        return fileRead;
    }

    public void setFileRead(Date fileRead) {
        this.fileRead = fileRead;
    }


    public String getChecksum() {
        return checksum;
    }

    public void setChecksum(String checksum) {
        this.checksum = checksum;
    }

    public Date getFileCreated() {
        return fileCreated;
    }

    public void setFileCreated(Date fileCreated) {
        this.fileCreated = fileCreated;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public long getDataFileId() {
        return dataFileId;
    }

}
